package homework.homework03;

public class Coder {
    private String name;//姓名
    private String id;//工号
    private double sal;//工资
    //有参构造

    public Coder(String name, String id, double sal) {
        this.name = name;
        this.id = id;
        this.sal = sal;
    }
    //无参构造
    public Coder(){}

    //get and set
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public double getSal() {
        return sal;
    }

    public void setSal(double sal) {
        this.sal = sal;
    }

    public void work(){
        System.out.println("工号为"+id+"基本工资为"+sal+"的程序员正在努力的写着代码");
    }
}
